package bean;

import java.util.Calendar;

/**
 * A base class for User for manipulation of the data
 * @author Anne Lorayne, Laura Dutra, Otavio Lima
 *
 */
public class UserBean {

	private String login;

	private String password;

	private String name;

	private String email;

	private String gender;

	private Calendar dateOfBirth;

	private String address;

	private String interests;

	private String whoIAm;

	private String movies;

	private String musics;

	private String books;

	private String ID;
	
	private String lastIdOfBlog;

	/**
	 * Constructor of the class
	 * @param login
	 * @param password
	 * @param name
	 * @param email
	 * @param gender
	 * @param dateOfBirth
	 * @param address
	 * @param interests
	 * @param whoIAm
	 * @param movies
	 * @param musics
	 * @param books
	 * @param ID
	 */
	public UserBean(String login, String password, String name, String email,
			String gender, Calendar dateOfBirth, String address,
			String interests, String whoIAm, String movies, String musics,
			String books, String ID) {
		this.login = login;
		this.password = password;
		this.name = name;
		this.email = email;
		this.gender = gender;
		this.dateOfBirth = dateOfBirth;
		this.address = address;
		this.interests = interests;
		this.whoIAm = whoIAm;
		this.movies = movies;
		this.musics = musics;
		this.books = books;
		this.ID = ID;
		lastIdOfBlog = "0";
	}
	
	public UserBean(){
	}
	

	// ------Getters and Setters------

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Calendar getDateOfBirth() {
		return dateOfBirth;
	}

	public void setDateOfBirth(Calendar dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getInterests() {
		return interests;
	}

	public void setInterests(String interests) {
		this.interests = interests;
	}

	public String getWhoIAm() {
		return whoIAm;
	}

	public void setWhoIAm(String whoIAm) {
		this.whoIAm = whoIAm;
	}

	public String getMovies() {
		return movies;
	}

	public void setMovies(String movies) {
		this.movies = movies;
	}

	public String getMusics() {
		return musics;
	}

	public void setMusics(String musics) {
		this.musics = musics;
	}

	public String getBooks() {
		return books;
	}

	public void setBooks(String books) {
		this.books = books;
	}

	public String getID() {
		return ID;
	}

	public void setID(String iD) {
		ID = iD;
	}
	
	/**
	 * @return the lastIdOfBlog
	 */
	public String getLastIdOfBlog() {
		return lastIdOfBlog;
	}

	/**
	 * @param lastIdOfBlog the lastIdOfBlog to set
	 */
	public void setLastIdOfBlog(String lastIdOfBlog) {
		this.lastIdOfBlog = lastIdOfBlog;
	}

	//TODO Mudei isso, verificar se quebra 
	@Override
	public boolean equals(Object obj) {
		if (obj == null || !(obj instanceof UserBean) )
			return false;
		UserBean anotherUserBean = (UserBean) obj;
		
		if (this.getID().equals(anotherUserBean.getID()))
			return true;
		
		return false;
	}

}
